import { _decorator, Component, Label, NodeEventType } from 'cc';
import { HitBallonCMD } from './GamePuremvc/Command/GameCMD';
import { IItemInfo } from './GamePuremvc/Model/ItemModel';
import { GameFacade } from '../fwk/puremvc/GameFacade';
const { ccclass, property } = _decorator;

@ccclass('Item')
export class Item extends Component {
    info: IItemInfo;
    @property(Label)
    txt: Label;
    protected onLoad(): void {
        this.node.on(NodeEventType.TOUCH_END, this.click, this);
    }
    click() {
        GameFacade.send(HitBallonCMD, this.info);
    }
}


